home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / lftp.vim < prev    next >
Encoding:
Text File  |  2001-08-28  |  4.8 KB  |  102 lines

  1. " Vim syntax file
  2. " Maintainer    : Nikolai 'pcp' Weibull <da.box@home.se>
  3. " URL        : http://www.pcppopper.org/
  4. " Revised on    : Mon, 27 Aug 2001 21:49:33 +0200
  5. " Language    : lftp Configuration file
  6.  
  7. if version < 600
  8.     syntax clear
  9. elseif exists("b:current_syntax")
  10.     finish
  11. endif
  12.  
  13. " Set iskeyword since we need `-' (and potentially others) in keywords.
  14. " For version 5.x: Set it globally
  15. " For version 6.x: Set it locally
  16. if version >= 600
  17.   command -nargs=1 SetIsk setlocal iskeyword=<args>
  18. else
  19.   command -nargs=1 SetIsk set iskeyword=<args>
  20. endif
  21. SetIsk 48-57,97-122,-
  22. delcommand SetIsk
  23.  
  24. " comments
  25. syn region  lftpComment        matchgroup=lftpComment start="#" end="$" contains=lftpTodo
  26.  
  27. " todo
  28. syn keyword lftpTodo        contained TODO FIXME
  29.  
  30. " strings
  31. syn region  lftpString        contained display oneline start=+"+ skip=+\\"+ end=+"+
  32.  
  33. " numbers
  34. syn match   lftpNumber        contained display "\<\d\+\(\.\d\+\)\=\>"
  35.  
  36. " booleans and other things
  37. syn keyword lftpBoolean        contained yes no on off true false
  38.  
  39. " intervals
  40. syn keyword lftpInterval    contained infinity inf never forever
  41. syn match   lftpInterval    contained "\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>"
  42.  
  43. " commands
  44. syn keyword lftpKeywords    alias anon at bookmark cache cat cd chmod close
  45. syn keyword lftpKeywords    command debug echo exit find get glob help jobs
  46. syn keyword lftpKeywords    kill lcd lpwd ls mget fg mirror more mput mrm
  47. syn keyword lftpKeywords    mv nlist open pget put pwd queue quote reget less
  48. syn keyword lftpKeywords    rels renlist repeat reput rm rmdir scache site
  49. syn keyword lftpKeywords    sleep source suspend user version wait zcat zmore
  50.  
  51. " settings
  52. syn region  lftpSet        matchgroup=lftpKeywords start="set" end=";" end="$" contains=lftpString,lftpNumber,lftpBoolean,lftpInterval,lftpSettings
  53.  
  54. " not quite right since options can be given like save-pa or bmk:save
  55. " but hopefully people type out the whole option when writing rc's
  56. syn match   lftpSettings    contained "\(\<bmk:\)\=\<save-passwords\>"
  57. syn match   lftpSettings    contained "\(\<cmd:\)\=\<\(at-exit\|csh-history\|default-protocol\|default-title\|fail-exit\|interactive\|long-running\|ls-default\)\>"
  58. syn match   lftpSettings    contained "\(\<cmd:\)\=\<\(move-background\|prompt\|remote-completion\|save-cwd-history\|\(set-\)\=term-status\|verbose\|verify-\(host\|path\)\)\>"
  59. syn match   lftpSettings    contained "\(\<dns:\)\=\<\(SRV-query\|cache-\(enable\|expire\|size\)\|fatal-timeout\|order\|use-fork\)\>"
  60. syn match   lftpSettings    contained "\(\<ftp:\)\=\<\(acct\|anon-\(pass\|user\)\|auto-sync-mode\|bind-data-socket\|fix-pasv-address\)\>"
  61. syn match   lftpSettings    contained "\(\<ftp:\)\=\<\(home\|list-options\|nop-interval\|passive-mode\|port-\(ipv4\|range\)\|proxy\)\>"
  62. syn match   lftpSettings    contained "\(\<ftp:\)\=\<\(rest-\(list\|stor\)\|retry-530\(-anonymous\)\=\|site-group\|skey-\(allow\|force\)\)\>"
  63. syn match   lftpSettings    contained "\(\<ftp:\)\=\<\(ssl-\(allow\|force\|protect-data\)\|stat-interval\|sync-mode\|fxp-passive-source\)\>"
  64. syn match   lftpSettings    contained "\(\<ftp:\)\=\<\(use-\(abor\|fxp\|site-idle\|stat\|quit\)\|verify-\(address\|port\)\|web-mode\)\>"
  65. syn match   lftpSettings    contained "\(\<hftp:\)\=\<\(cache\|proxy\|use-\(authorization\|head\|type\)\)\>"
  66. syn match   lftpSettings    contained "\(\<http:\)\=\<\(accept\(-charset\|-language\)\=\|cache\|cookie\|post-content-type\|proxy\)\>"
  67. syn match   lftpSettings    contained "\(\<http:\)\=\<\(put-\(method\|content-type\)\|referer\|set-cookies\|user-agent\)\>"
  68. syn match   lftpSettings    contained "\(\<https:\)\=\<proxy\>"
  69. syn match   lftpSettings    contained "\(\<mirror:\)\=\<\(loose-\)\=time-precision\>"
  70. syn match   lftpSettings    contained "\(\<module:\)\=\<path\>"
  71. syn match   lftpSettings    contained "\(\<net:\)\=\<\(connection-\(limit\|takeover\)\|idle\|limit-\(total-\)\=\(rate\|max\)\)\>"
  72. syn match   lftpSettings    contained "\(\<net:\)\=\<\(max-retries\|no-proxy\|persist-retries\|reconnect-interval-\(base\|max\|multiplier\)\)\>"
  73. syn match   lftpSettings    contained "\(\<net:\)\=\<\(socket-\(buffer\|maxseg\)\|timeout\)\>"
  74. syn match   lftpSettings    contained "\(\<xfer:\)\=\<\(clobber\|eta-\(period\|terse\)\|max-redirections\|rate-period\|make-backup\)\>"
  75.  
  76. " Define the default highlighting.
  77. " For version 5.7 and earlier: only when not done already
  78. " For version 5.8 and later: only when an item doesn't have highlighting yet
  79. if version >= 508 || !exists("did_lftp_syn_inits")
  80.     if version < 508
  81.     let did_lftp_syn_inits = 1
  82.     command -nargs=+ HiLink hi link <args>
  83.     else
  84.     command -nargs=+ HiLink hi def link <args>
  85.     endif
  86.  
  87.     HiLink lftpComment        Comment
  88.     HiLink lftpTodo        Todo
  89.     HiLink lftpString        String
  90.     HiLink lftpNumber        Number
  91.     HiLink lftpBoolean        Number
  92.     HiLink lftpInterval        Number
  93.     HiLink lftpKeywords        Keyword
  94.     HiLink lftpSettings        Type
  95.     delcommand HiLink
  96. endif
  97.  
  98. let b:current_syntax = "lftp"
  99.  
  100. " vim: set sw=4 sts=4:
  101.  
  102.